package easy

import "math/bits"

func HammingDistance1(x int, y int) int {
	return bits.OnesCount(uint(x ^ y))

}
func HammingDistance(x int, y int) (ans int) {
	for s := x ^ y; s > 0; s &= s - 1 {
		ans++
	}
	return
}
